import http from './request'

//属性分类列表
export const productAttrList = (params: IProductAttrParams): RES<IProductAttrModel> => http.get('/productAttribute/category/list', { params })

///删除单个属性分类 
export const productAttrDeleteId = (id: number): RES<number> => http.get(`/productAttribute/category/delete/${id}`)

//添加属性分类 /productAttribute/category/create
export const productAttrCreate = (name: string): RES<number> => http.post(`/productAttribute/category/create?name=${name}`)

//根据id获取单个属性分类 
export const productAttrCategoryId = (id: number): RES<IProductAttr> => http.get(`/productAttribute/category/${id}`)

//修改属性分类
export const productAttrUpdate = (id: number, name: string): RES<number> => http.post(`/productAttribute/category/update/${id}?name=${name}`)
